package com.itHsuSE.smallchange.oopTest;

public class Student extends Person{
    private String stuId;

    public Student(String name, char sex, int age,String stuId) {
        super(name, sex, age);
        this.stuId=stuId;
    }

    public String getStuId() {
        return stuId;
    }

    public void setStuId(String stuId) {
        this.stuId = stuId;
    }

    public void study(){
        System.out.println("好好学习");
    }

    @Override
    public String play() {
        return super.play()+"足球";
    }

    @Override
    public void printInfo() {
        System.out.println("学生的信息：");
        super.printInfo();
        System.out.println("学号："+this.getStuId());
        this.study();
        System.out.println(this.play());
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuId='" + stuId + '\'' +
                '}'+super.toString();
    }
}
